package fr.afcepf.atod18.commande.entity;

import java.util.Calendar;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import fr.afcepf.atod18.client.entity.Client;
import fr.afcepf.atod18.client.entity.Remise;
import fr.afcepf.atod18.utilitaires.entity.Adresse;

@Entity
@Table
public class Commande {
	@Id
	@Column(name="id", unique=true)
	@GeneratedValue(strategy=GenerationType.AUTO)
	private int id;
	
	@Column(nullable=false)
	private Calendar dateCommandeCalendar;
	
	@Column(nullable=false)
	private Calendar dateDemandeLivraison;
	
	private Calendar dateLivraison;
	private double totalCommande;
	
	@Column(nullable=false)
	private Client client;
	private Adresse adresse;
	private Remise remise;
	
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public Calendar getDateCommandeCalendar() {
		return dateCommandeCalendar;
	}
	public void setDateCommandeCalendar(Calendar dateCommandeCalendar) {
		this.dateCommandeCalendar = dateCommandeCalendar;
	}
	public Calendar getDateDemandeLivraison() {
		return dateDemandeLivraison;
	}
	public void setDateDemandeLivraison(Calendar dateDemandeLivraison) {
		this.dateDemandeLivraison = dateDemandeLivraison;
	}
	public Calendar getDateLivraison() {
		return dateLivraison;
	}
	public void setDateLivraison(Calendar dateLivraison) {
		this.dateLivraison = dateLivraison;
	}
	public double getTotalCommande() {
		return totalCommande;
	}
	public void setTotalCommande(double totalCommande) {
		this.totalCommande = totalCommande;
	}
	public Client getClient() {
		return client;
	}
	public void setClient(Client client) {
		this.client = client;
	}
	public Adresse getAdresse() {
		return adresse;
	}
	public void setAdresse(Adresse adresse) {
		this.adresse = adresse;
	}
	public Remise getRemise() {
		return remise;
	}
	public void setRemise(Remise remise) {
		this.remise = remise;
	}
	
	
}
